package com.inibb.app.util;


import java.beans.PropertyEditorSupport;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class SimpleDateEditor extends PropertyEditorSupport {
	private Logger logger = LoggerFactory.getLogger(this.getClass());
	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		String date = null;
		if(text!=null)
			date = text.replaceAll("-", "");
		/*try {
			setValue(new SimpleDate(text).getDate());
		} catch (VLDException e) {
			logger.trace("set value error", e);
		}*/
	}

	/**
	 * This implementation returns <code>null</code> to indicate that
	 * there is no appropriate text representation.
	 */
	@Override
	public String getAsText() {
		Date value = (Date)getValue();
		return null;//(value != null ? (new SimpleDate(value)).getYYYYMMDD() : "");
	}
}
